﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo3
{
    class SumUtils
    {
        public SumUtils(int a,int b)
        {
            Console.WriteLine("和为{0}",(a+b));
        }
        public SumUtils(double a, double b)
        {
            Console.WriteLine("和为{0}", (a + b));
        }
        public SumUtils(string a, string b)
        {
            Console.WriteLine("相加为{0}", (a + b));
        }
        public SumUtils(int a)
        {
            int sum = 0;
            for (int i = 1; i <= a; i++)
            {
                sum += i;
            }
            Console.WriteLine("和为{0}",sum);
        }
    }
}
